aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(((()))) copies data from the specified miscellaneous of an audio
file to _b_u_f. The _f_i_l_e structure maintains internally a logical read
pointer for each miscellaneous chunk in the file. This allows you to
read and write miscellaneous data (e.g., MIDI system exclusive data) from
a file in small pieces in separate calls.
You call aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(3dm) to obtain the list of miscellaneous chunk ID's
for _f_i_l_e. You call aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(3dm) to figure out what types of
miscellaneous chunks you have (see the aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(3dm) man page for
more information), and you call aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(3dm) to determine the total
number of bytes in each chunk.
When a file is opened by aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) or aaaaffffOOOOppppeeeennnnFFFFDDDD(3dm), the logical
read pointer for each miscellaneous data chunk is initialized to the
first data byte in the chunk. On return from aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(((()))), the chunk's
read pointer is automatically updated so that it points to the data byte
following the last one copied into _b_u_f.
aaaaffffWWWWrrrriiiitttteeeeMMMMiiiisssscccc(((()))) transfers data from _b_u_f the specified miscellaneous chunk
of an audio file. The _f_i_l_e structure maintains an internal logical write
pointer for each miscellaneous chunk, so that you can write part of the
data for a chunk with one call to aaaaffffWWWWrrrriiiitttteeeeMMMMiiiisssscccc(((()))), and write more data
later with a second call.
You call aaaaffffIIIInnnniiiittttMMMMiiiissssccccIIIIDDDDssss(3dm) to set the list of miscellaneous chunk ID's
for _f_i_l_e when it is opened. You call aaaaffffIIIInnnniiiittttMMMMiiiissssccccTTTTyyyyppppeeee(3dm) to initialize
the types of miscellaneous chunks in the file (see the man page for
aaaaffffIIIInnnniiiittttMMMMiiiissssccccTTTTyyyyppppeeee(3dm) for more details), and you call aaaaffffIIIInnnniiiittttMMMMiiiissssccccSSSSiiiizzzzeeee(3dm)
to set the total number of data bytes allocated for each chunk.
When an audio file is created by a call to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm), the write
pointer for each miscellaneous chunk is initialized to the first data
byte in the chunk. The data area for each chunk is initially filled with
0's. On return from aaaaffffWWWWrrrriiiitttteeeeMMMMiiiisssscccc(((()))), the logical write pointer for _m_i_s_c_i_d
is automatically updated so that it points to the data byte following the
last one copied from _b_u_f to the file. It is up to the application to fill
the data area of each chunk with consistent information (e.g., if you
don't use all the bytes you allocated for a MIDI chunk, fill the
remaining bytes with no-op messages).
aaaaffffSSSSeeeeeeeekkkkMMMMiiiisssscccc allows you to reposition the logical read/write pointer for a
specified miscellaneous chunk inside an audio file. For example, you can
move the read pointer for a MIDI data chunk in an AIFF/AIFF-C file to any
location within the MIDI data before calling aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc. It is illegal
to move the logical read/write pointer to a position before the first
data byte of the specified chunk, or after the last data byte.